package com.frank.feignDecoder.config;

import com.frank.feignDecoder.decoder.MyDecoder;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import feign.codec.Decoder;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringDecoder;
import org.springframework.context.annotation.Bean;

/**
 * @author 小石潭记
 * @date 2021/3/8 11:01
 * @Description: ${todo}
 */
public class BusinessTwoConfig implements RequestInterceptor {

    @Bean
    public Decoder decoder() {
        return new MyDecoder();
    }


    @Override
    public void apply(RequestTemplate requestTemplate) {
        // todo 添加请求头的信息
    }
}
